//
//  ViewController.m
//  PTLAlertView
//
//  Created by soliloquy on 2018/1/15.
//  Copyright © 2018年 soliloquy. All rights reserved.
//

#import "ViewController.h"
#import "PTLAlertView.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

}

- (IBAction)show2:(id)sender {
    
    PTLAlertView *alertView = [[PTLAlertView alloc]initWithTitle:@"我是标题" message:@"你好你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈吗哈哈" cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
    
    [alertView setSelctBtnBlock:^(NSInteger index, NSString * _Nullable btnCurrentTitle) {
        NSLog(@"hha- %zd ---- %@", index, btnCurrentTitle);
    }];

    alertView.cancelBtnTextColor = [UIColor redColor];
    [alertView show];
    
}

- (IBAction)show1:(id)sender {
    PTLAlertView *alertView = [[PTLAlertView alloc]initWithTitle:@"我是标题" message:@"你好你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈吗哈哈" cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];
    
    [alertView setSelctBtnBlock:^(NSInteger index, NSString * _Nullable btnCurrentTitle) {
        NSLog(@"hha- %zd ---- %@", index, btnCurrentTitle);
    }];
    
    alertView.cancelBtnTextColor = [UIColor redColor];
    [alertView show];
}

- (IBAction)showAlert:(id)sender {
    
    PTLAlertView *alertView = [[PTLAlertView alloc]initWithTitle:@"我是标题" message:@"你好你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈吗哈哈你好你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈吗哈哈你好你好吗哈哈你好你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈你好吗哈哈吗哈哈" cancelButtonTitle:@"取消" otherButtonTitles:@"确定",@"等一会", nil];
    
    [alertView setSelctBtnBlock:^(NSInteger index, NSString * _Nullable btnCurrentTitle) {
        NSLog(@"hha- %zd ---- %@", index, btnCurrentTitle);
    }];
    
//    alertView.titleBackgroundColor = [UIColor redColor];
//    alertView.titleTextColor = [UIColor greenColor];
//    alertView.titleTextFont = [UIFont systemFontOfSize:20];
//    alertView.messageTextColor = [UIColor redColor];
//    alertView.messageTextFont = [UIFont systemFontOfSize:15];
    alertView.cancelBtnTextColor = [UIColor redColor];
//    alertView.cancelBtnTextFont = [UIFont systemFontOfSize:20];
//    alertView.otherBtnTextColor = [UIColor yellowColor];
//    alertView.otherBtnTextFont = [UIFont systemFontOfSize:20];
    
    [alertView show];
}


@end
